package com.qfjy.homework.xuhuiqianpai;

/**
 * @author: xh
 * @date: 2022/11/10 19:32
 * @version: 1.0
 */

import java.math.BigDecimal;

/**
 * TODO 实际支付  --  策略引用
 */
public class ActualPayment {

    private Payable payable;

    public ActualPayment(Payable payable) {
        this.payable = payable;
    }

    public BigDecimal pay(BigDecimal price){
        return payable.payPrice(price);
    }
}
